package com.quanyan.stadium.constants;

/**
 * Created by Administrator on 2014/12/6.
 */
public class GameConstants {
    /**
     * 创建赛事方式
     *
     * 1:俱乐部创建;0:官方创建; 2:个人创建;3:现场编排
     * */
    public static final Byte CLUB_CREATE = 1;
    public static final Byte OFFICIAL_CREATE = 0;
    public static final Byte PERSONAL_CREATE = 2;
    public static final Byte SCENE_CREATE = 3;


    /**
     * 队伍类别
     *
     * 1:俱乐部;0:个人
     * */
    public static final Byte TEAM_TYPE_CLUB = 1;
    public static final Byte TEAM_TYPE_PERSON = 0;

    /**
     * 比赛评级（评级积分影响雷达图数值）
     * 评级积分 = 球类基础值*评级权重*赛事评级系数*（W-We）
     * We = 1/(1+10^((R2-R1)/400))
     * R2:对手赛前评级积分；R1:本队赛前评级积分
     * W:比赛结果赋值（胜：1；平：0.5；负：0）
     */
    public static final Integer BALL_BASE_INTEGRAL = 30;//球类基础值
    public static final Integer GRADE_BASE_INTEGRAL = 100;//个人评级积分初始值

    /**
     * 个人比赛类型,用于统计
     *
     * */
    public static final Byte GAME_TYPE_OFFICIAL= 0;  //官方赛
    public static final Byte GAME_TYPE_PK = 1;      //PK赛事

    /**
     * 赛制当前状态
     *
     *
     * */
    public static final Byte GAME_EVENT_ZERO = -1;  //设置不存在
    public static final Byte GAME_EVENT_PRE = 0;  //预热
    public static final Byte GAME_EVENT_SIGN = 1; //报名中
    public static final Byte GAME_EVENT_START = 2; //进行中
    public static final Byte GAME_EVENT_END = 3; //已结束

    /**
     * 结果录入状态
     *
     *
     * */
    public static final Byte RECORD_WAIT = 0;
    public static final Byte RECORD_WAIT_SURE = 1;
    public static final Byte RECORD_SUCCESS = 2;
    public static final Byte RECORD_FAIL = -1;
    public static final Byte RECORD_SECOND_WAIT_SURE = 3;

    /**
     * 比赛结果
     * */
    public static final Byte SCHEDULE_TIE = -1;
    public static final Byte SCHEDULE_LOSE = 0;
    public static final Byte SCHEDULE_WIN = 1;

    /**
     * 积分录入,管理员/普通人员
     *
     *
     * */
    public static final Byte RECORD_TYPE_NORMAL = 0;
    public static final Byte RECORD_TYPE_ADMIN = 1;


    /**
     *
     * 定义栏目的默认id,这个应该是个表里的数据
     *
     * */
    public static final Integer CATEGORY_NUM = 4;//栏目数目（注意：添加或删除栏目时这个值要修改）

    public static final int CATEGORY_ID_FOOTBALL = 3;  //足球
    public static final int CATEGORY_ID_BASKETBALL = 1;//篮球
    public static final int CATEGORY_ID_TENNIS = 4;    //网球
    public static final int CATEGORY_ID_BADMINTON = 2; //羽毛球
    public static final int CATEGORY_ID_RUNNING = 12;   //跑步
    public static final int CATEGORY_ID_RIDING = 11;    //骑行
    public static final int CATEGORY_ID_GYM = 10;       //户外


    /**
     * 定义积分计算的相关MQ
     *
     * */

    public static final String STADIUM_TOPIC_ROUND = "STADIUM_TOPIC_ROUND";  //主题
    public static final String STADIUM_TOPIC_ROUND_RECORD = "STADIUM_TOPIC_ROUND_RECORD";  //赛事相关 tag
    public static final String STADIUM_TOPIC_PK_RANK_PAGE = "STADIUM_TOPIC_PK_RANK_PAGE";  //pk赛事排行榜分页相关 tag

    /**
     * 消息业务处理
     * */
    public static final String STADIUM_TAG_ROUND_RECORD = "STADIUM_TOPIC_ROUND_RECORD"; //栏目积分
    public static final String STADIUM_TAG_SCORE_GRADE = "STADIUM_TOPIC_SCORE_GRADE";   //评级积分
    public static final String STADIUM_TAG_USER_SCHEDULE_INIT_SCHEDULE = "STADIUM_TOPIC_USER_SCHEDULE_INIT_SCHEDULE";
    public static final String STADIUM_TAG_USER_SCHEDULE_UPDATE_SCHEDULE = "STADIUM_TOPIC_USER_SCHEDULE_UPDATE_SCHEDULE";
    public static final String STADIUM_TAG_USER_SCHEDULE_FINALLY_SCHEDULE = "STADIUM_TOPIC_USER_SCHEDULE_FINALLY_SCHEDULE";
    public static final String STADIUM_TAG_GAME_EVENT_FINISH_INIT_GAME_SCORE = "STADIUM_TAG_GAME_EVENT_FINISH_INIT_GAME_SCORE";     //赛事结束初始化比赛积分
    public static final String STADIUM_TAG_USER_PK_GAME_COLLECT = "STADIUM_TAG_USER_PK_GAME_COLLECT";
    public static final String STADIUM_TAG_GAME_RADAR_CHART= "STADIUM_TAG_GAME_RADAR_CHART";
    public static final String STADIUM_TAG_GAME_SCHEDULE_END_PUSH_MSG= "STADIUM_TAG_GAME_SCHEDULE_END_PUSH_MSG";


    public static final String STADIUM_TAG_GAME_EVENT_FINISH_JOIN_INTO_MONTH= "STADIUM_TAG_GAME_EVENT_FINISH_JOIN_INTO_MONTH";      //排位赛积分录入到月赛事中
    public static final String STADIUM_TAG_GAME_EVENT_FINISH_PUSH_MSG= "STADIUM_TAG_GAME_EVENT_FINISH_PUSH_MSG";      //赛事结束,开始推送相关信息
    public static final String STADIUM_TAG_GAME_EVENT_FINISH_MSG_COLLECT= "STADIUM_TAG_GAME_EVENT_FINISH_MSG_COLLECT";      //赛事结束开始数据收集



    //已删除 未删除
    public static final Byte IS_DELETE = 1;
    public static final Byte IS_NOT_DELETE = 0;

    //赛事主场与客场
    public static final Byte GAME_HOME = 0;
    public static final Byte GAME_AWAY = 1;

    //数字体系
    public static final Byte DEFULT_NUM_2 = 2;

    //缓存保存10天
    public static final Integer RADAR_CHART_REDIS_EXPIRE_TIME = 1 * 60 * 24 * 10;
    /**
     * 支付相关
     */
    //业务id
    public static final String STADIUM_SYSTEM_SUBMIT_ORDER = "D";

    public static final Integer PAY_WAY_ALIPAY = 1; //支付宝
    public static final Integer PAY_WAY_WEICHAT = 2; //微信支付
    public static final Integer PAY_WAY_WEICHATH5 = 3; //微信公众号支付
    public static final Integer PAY_WAY_UNION_PAY = 4; //银联支付
    public static final Integer PAY_WAY_APPLE_PAY = 5; //apple pay.
    public static final Integer PAY_WAY_FOR_FREE = 6; //免费
    public static final Integer PAY_WAY_FOR_AGES = 7; //鸟蛋
    public static final Integer PAY_WAY_FOR_SHELL = 8; //蛋壳
    public static final Integer PAY_WAY_FOR_CLUBACCOUNT = 8; //蛋壳

    public static final Integer OTHER_PAY_EGG = 1;
    public static final Integer OTHER_PAY_CLUB = 2;

    //报名能使用鸟蛋的比率，0.1
    public static final Double SIGN_USE_EGG_PERCENT = 0.1;
    //报名能使用俱乐部余额比率
    public static final Double SIGN_USER_CLUBACCOUNT_PERCENT = 1D;

    /**
     * 金额支付
     */
    public static final String MONEY_PAY_DESC = "赛事活动报名金额支付";
    /**
     * 两种额外支付方式
     */
    public static final String OTHER_PAY_NAME_EGG = "赛事活动报名鸟蛋支付";
    public static final String OTHER_PAY_NAME_CLUB = "俱乐部余额";




    //运动场订单的有效时间 5分钟
    public static final Integer ORDER_DEAD_LINE_TIME = 5;

    //评级积分初始值
    public static final Integer INIT_INTEGRAL = 129;
    //轮次下的最大赛程数
    public static final Integer GAME_SCHEDULE_NUM = 200;

    // PK 结果
    public final static int PK_RESULT_WIN = 1;
    public final static int PK_RESULT_DRAW = 2;
    public final static int PK_RESULT_LOSE = 3;

    // 运动场PK赛业务id
    public final static String STADIUM_PK_CODE = "STADIUM_PK_CODE";
    // 运动场官方赛业务id
    public final static String STADIUM_GAME = "STADIUM_GAME";

    /**
     * 初始化用户级别
     */
    public final static int NOVICE = 1;//新手
    public final static int PROFICIENT = 2;//熟练
    public final static int SUPERIOR = 3;//高手


    //支付状态：
    public static final Byte ON_PAYING = 1; //支付期间
    public static final Byte FAIL_PAY = 2;//支付失败
    public static final Byte SUCCESS_PAY = 3;//支付成功

    //订单状态
    public static final Byte WAIT_ORDER = 0;//已下单等待支付
    public static final Byte EXPIRE_ORDER = 1;//订单超时
    public static final Byte SUCCESS_ORDER = 2;//支付成功
    public static final Byte CANCEL_ORDER = 3;//取消订单
    public static final Byte FAIL_ORDER = 4;//支付失败
    public static final Byte ON_REFUND = 5;//退款中
    public static final Byte SUCCESS_REFUND = 6;//退款成功
    public static final Byte FAIL_REFUND = 7;//退款成功



    //是否
    public static final Byte ORDER_IS_CLOST_YES = 1;
    public static final Byte ORDER_IS_CLOST_NO = 0;

    //一天中允许订单失败量
    public static final Integer FAILED_ORDER_LIMIT = 20;



    //订单状态,反馈给前段
    public static final Byte APP_STADIUM_ORDER_CANCEL = 0;
    public static final Byte APP_STADIUM_ORDER_WAIT_PAY = 1;
    public static final Byte APP_STADIUM_ORDER_PAYING = 2;
    public static final Byte APP_STADIUM_ORDER_PAYED=3;
    public static final Byte APP_STADIUM_ORDER_REFUNDING=4;
    public static final Byte APP_STADIUM_ORDER_REFUND=5;




    //MQ
    public static final String STADIUM_GROUP_ORDER_PAY = "STADIUM_GROUP_ORDER_PAY111"; //.
    public static final String STADIUM_INSTANCE_ORDER_PAY = "STADIUM_INSTANCE_ORDER_PAY111"; //.

    public static final String STADIUM_GROUP_ORDER_REFUND = "STADIUM_GROUP_ORDER_REFUND"; //.
    public static final String STADIUM_INSTANCE_ORDER_REFUND = "STADIUM_INSTANCE_ORDER_REFUND"; //.


    /**
     * 用户赛事状态
     */
    public static final int USER_GAME_STATUS_OVER = 1;
    public static final  int USER_GAME_STATUS = 0;

    /**
     * 默认的参数分组key
     *
     * */
    public static final String STADIUM_DEFAULT_GROUP_PARAMETER_KEY = "STADIUM_PUSH_MSG";    //消息分组
    public static final String STADIUM_DEFAULT_GROUP_BASE_CONFIG_KEY = "STADIUM_BASE_CONFIG";    //运动场基础配置分组


    /**
     * 基础配置分组内的key
     *
     * */
    public static final String BASE_CONFIG_KEY_OFFICIAL_HOST_NAME = "BASE_CONFIG_KEY_OFFICIAL_HOST_NAME";    //运动场官方赛默认名称
    public static final String BASE_CONFIG_KEY_OFFICIAL_HOST_ICON = "BASE_CONFIG_KEY_OFFICIAL_HOST_ICON";    //运动场官方赛默认头像

    //描述名称
    public static final String BASE_CONFIG_KEY_EXTEND_NAME = "BASE_CONFIG_KEY_EXTEND_NAME";    //扩展描述(用;隔开)


    /**
     * 评级峰值
     */
    public static final Integer PEAK_VALUE_FOOTBALL = 2400;
    public static final Integer PEAK_VALUE_BASKETBALL = 2400;
    public static final Integer PEAK_VALUE_TENNIS = 3000;
    public static final Integer PEAK_VALUE_BADMINTON = 3000;

    public static final Double PEAK_GRADE_FOOTBALL = 8.0;
    public static final Double PEAK_GRADE_BASKETBALL = 8.0;
    public static final Double PEAK_GRADE_TENNIS = 6.0;
    public static final Double PEAK_GRADE_BADMINTON = 8.0;

    /**
     * 支付相关
     *
     */
    public static final Integer DEFAULT_CHANNEL = 0;
    public static final String CONTRACT_MOBILE = "";
    public static final String CONTRACT_NAME = "百灵鸟";

    public static final Integer MCHID = 2;

    public static final String NOTIFYURL = "";

    public static final String SERVICE = "service.stadium";

    //TODO 本地测试完改成5分钟
    public static final Integer PAYTIMETOU = 5;

    public static final String ORDERDESC = "赛事用户报名支付";

    public static final String PRODUCT_URL = "www.quncaotech.com";
    public static final String PRODUCT_DESC = "比赛报名";
    public static final String PRODUCT_ICON = "www.quncaotech.com";
    public static final Integer QUANLITY = 1;

    public static final int PAGE_NUM_DEFAULT = 0;

    //运动场 banner图数量
    public static final Integer BANNER_NUM = 6;

    //运动场 默认用户所属城市id
    public static final int DEFAULT_CITY_ID = 6;


    /**
     * ITLS任务的key
     *
     * */
    public static final String STADIUM_JOB_ID_CLOSE_ORDER = "STADIUM_JOB_ID_CLOSE_ORDER";
    public static final String STADIUM_JOB_ID_REFRESH_OFFICIAL_GAME = "STADIUM_JOB_ID_REFRESH_OFFICIAL_GAME";
    public static final String STADIUM_JOB_ID_REFRESH_COMPLEMENTE_OFFICIAL_GAME = "STADIUM_JOB_ID_REFRESH_COMPLEMENTE_OFFICIAL_GAME";
    public static final String STADIUM_JOB_ID_REFRESH_GAME_EVENT_NUM = "STADIUM_JOB_ID_REFRESH_GAME_EVENT_NUM";
    public static final String STADIUM_JOB_ID_REFRESH_USER_SCORE = "STADIUM_JOB_ID_REFRESH_USER_SCORE";
    public static final String STADIUM_JOB_ID_GAME_START_REMIND_1_HOUR = "STADIUM_JOB_ID_GAME_START_REMIND_1_HOUR";
    public static final String STADIUM_JOB_ID_GAME_START_REMIND_0_HOUR = "STADIUM_JOB_ID_GAME_START_REMIND_0_HOUR";
    public static final String STADIUM_JOB_ID_REFRESH_EXCEPTION_MQ = "STADIUM_JOB_ID_REFRESH_EXCEPTION_MQ";
    public static final String STADIUM_JOB_ID_REFRESH_INVITE_COUNT = "STADIUM_JOB_ID_REFRESH_INVITE_COUNT";
    public static final String STADIUM_JOB_ID_UPDATE_PERSON_PK_RECORD = "STADIUM_JOB_ID_UPDATE_PERSON_PK_RECORD";
    public static final String STADIUM_JOB_ID_CLOSE_PERSON_PK_EXPIRE = "STADIUM_JOB_ID_CLOSE_PERSON_PK_EXPIRE";

    /**
     * 是否启用
     */
    public static final Byte IS_ENABLE = 1;
    public static final Byte IS_DISABLE = 0;


    /**
     * 场馆场地id的一个默认虚假id,起始值
     *
     * */
    public static final int DEFAULT_FIRST_PLACE_UNIT_ID = 987654321;


    public static final int DEFAULT_PLACE_UNIT_NUM = 30;

    /**
     * 赛事删除类型
     * 0、不删除；1、管理员主动取消；2、系统自动取消
     */
    public static final byte DELETE_NOT = 0;
    public static final byte DELETE_BY_ADMINISTRATOR = 1;
    public static final byte DELETE_BY_SYSTEM = 2;


}

